package com.diankangwo.factory.service.impl;

import com.diankangwo.factory.dao.TdDistrictMapper;
import com.diankangwo.factory.entity.TdDistrict;
import com.diankangwo.factory.service.TdDistrictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/** 街道接口实现类
 * Created by wuye on 2017/9/15.
 */
@Service("TdDistrictService")
public class TdDistrictServiceImpl implements TdDistrictService{

    @Autowired
    private TdDistrictMapper mapper;

    /**
     * 根据城市ID获取街道
     * @param cityid
     * @return
     */
    @Override
    public List<TdDistrict> queryByCityId(int cityid) {
        return mapper.queryByCityId(cityid);
    }

    @Override
    public int deleteByPrimaryKey(Integer districtid) {
        return mapper.deleteByPrimaryKey(districtid);
    }

    @Override
    public int insert(TdDistrict record) {
        return mapper.insert(record);
    }

    @Override
    public int insertSelective(TdDistrict record) {
        return mapper.insertSelective(record);
    }

    @Override
    public TdDistrict selectByPrimaryKey(Integer districtid) {
        return mapper.selectByPrimaryKey(districtid);
    }

    @Override
    public int updateByPrimaryKeySelective(TdDistrict record) {
        return mapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(TdDistrict record) {
        return mapper.updateByPrimaryKey(record);
    }
}
